import { defineStore } from "pinia";
import { ref } from "vue";
import type { payListType } from "../../types";

export const useGroupList =  defineStore("group-list", () => {
  const groupList = ref<payListType[]>([]); // 根据实际数据类型替换 'any'

  const setGroupList = (list: payListType[]) => {
    groupList.value = list;
  };

  const removeGroupList = () => {
    groupList.value = [];
  };

  return { groupList, setGroupList, removeGroupList };
},{
  persist:true
});